Don't clear echo area prematurely when handling select window events (Bug#11304).
authormartin rudalics <rudalics@gmx.at>
Tue, 24 Apr 2012 08:56:31 +0000 (10:56 +0200)
committermartin rudalics <rudalics@gmx.at>
Tue, 24 Apr 2012 08:56:31 +0000 (10:56 +0200)
* keyboard.c (read_char): Don't wipe echo area for select window
events: These might get delayed via `mouse-autoselect-window'
(Bug#11304).
* window.el (handle-select-window): Clear echo area since this is
no more done by read_char (Bug#11304).

lisp/ChangeLog
lisp/window.el
src/ChangeLog
src/keyboard.c

index e4921dc0818f4a34d12c002010a89cab64b0bac0..4264dbb2d9d11ce5b17425f7a3613fbf915feecd 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-24  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.el (handle-select-window): Clear echo area since this is
+       no more done by read_char (Bug#11304).
+
 2012-04-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * ibuffer.el (ibuffer-mode-map): Bind `/ m' to filter-used-mode
index c148f5ee01fc34fe2621f9fdf1fc1909d14aedd1..b8f1bf3456d3492ceacdcd05dd5dc981d9da2cec 100644 (file)
@@ -5727,6 +5727,8 @@ is active.  This function is run by `mouse-autoselect-window-timer'."
        (setq mouse-autoselect-window-state nil)
        ;; Run `mouse-leave-buffer-hook' when autoselecting window.
        (run-hooks 'mouse-leave-buffer-hook))
+      ;; Clear echo area.
+      (message nil)
       (select-window window))))
 
 (defun truncated-partial-width-window-p (&optional window)
index 843636c32c372854cade0d47b1630bfd29fafb8d..04ac1dfbc137a33c56ef8ad98d10252a9f13a84a 100644 (file)
@@ -1,3 +1,9 @@
+2012-04-24  Martin Rudalics  <rudalics@gmx.at>
+
+       * keyboard.c (read_char): Don't wipe echo area for select window
+       events: These might get delayed via `mouse-autoselect-window'
+       (Bug#11304).
+
 2012-04-24  Juanma Barranquero  <lekktu@gmail.com>
 
        * gnutls.c (init_gnutls_functions): Protect against (unlikely)
index 614746e35b21abcde64224831d5dda68053145b1..48b31d8b564b6f13d1fd964d7721dd4016ab6e71 100644 (file)
@@ -2984,7 +2984,10 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
      own stuff with the echo area.  */
   if (!CONSP (c)
       || (!(EQ (Qhelp_echo, XCAR (c)))
-         && !(EQ (Qswitch_frame, XCAR (c)))))
+         && !(EQ (Qswitch_frame, XCAR (c)))
+         /* Don't wipe echo area for select window events: These might
+            get delayed via `mouse-autoselect-window' (Bug#11304).  */
+         && !(EQ (Qselect_window, XCAR (c)))))
     {
       if (!NILP (echo_area_buffer[0]))
        safe_run_hooks (Qecho_area_clear_hook);